<!doctype html>
<html class="default no-js">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>&quot;core/sequences&quot; | @magenta/music</title>
	<meta name="description" content="">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
	<div class="tsd-page-toolbar">
		<div class="container">
			<div class="table-wrap">
				<div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base="..">
					<div class="field">
						<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
						<input id="tsd-search-field" type="text" />
					</div>
					<ul class="results">
						<li class="state loading">Preparing search index...</li>
						<li class="state failure">The search index is not available</li>
					</ul>
					<a href="../index.html" class="title">@magenta/music</a>
				</div>
				<div class="table-cell" id="tsd-widgets">
					<div id="tsd-filter">
						<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
						<div class="tsd-filter-group">
							<div class="tsd-select" id="tsd-filter-visibility">
								<span class="tsd-select-label">All</span>
								<ul class="tsd-select-list">
									<li data-value="public">Public</li>
									<li data-value="protected">Public/Protected</li>
									<li data-value="private" class="selected">All</li>
								</ul>
							</div>
							<input type="checkbox" id="tsd-filter-inherited" checked />
							<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
							<input type="checkbox" id="tsd-filter-only-exported" />
							<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
						</div>
					</div>
					<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
				</div>
			</div>
		</div>
	</div>
	<div class="tsd-page-title">
		<div class="container">
			<ul class="tsd-breadcrumb">
				<li>
					<a href="../globals.html">Globals</a>
				</li>
				<li>
					<a href="_core_sequences_.html">&quot;core/sequences&quot;</a>
				</li>
			</ul>
			<h1>External module &quot;core/sequences&quot;</h1>
		</div>
	</div>
</header>
<div class="container container-main">
	<div class="row">
		<div class="col-8 col-content">
			<section class="tsd-panel tsd-comment">
				<div class="tsd-comment tsd-typography">
					<div class="lead">
						<p>A library for common manipulations of <code>NoteSequence</code>s.</p>
					</div>
					<dl class="tsd-comment-tags">
						<dt>license</dt>
						<dd><p>Copyright 2018 Google Inc. All Rights Reserved.</p>
							<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
								you may not use this file except in compliance with the License.
							You may obtain a copy of the License at</p>
							<p>   <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a></p>
							<p>Unless required by applicable law or agreed to in writing, software
								distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
								WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
								See the License for the specific language governing permissions and
							limitations under the License.</p>
						</dd>
					</dl>
				</div>
			</section>
			<section class="tsd-panel-group tsd-index-group">
				<h2>Index</h2>
				<section class="tsd-panel tsd-index-panel">
					<div class="tsd-index-content">
						<section class="tsd-index-section ">
							<h3>Classes</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-class tsd-parent-kind-external-module"><a href="../classes/_core_sequences_.badtimesignatureexception.html" class="tsd-kind-icon">Bad<wbr>Time<wbr>Signature<wbr>Exception</a></li>
								<li class="tsd-kind-class tsd-parent-kind-external-module"><a href="../classes/_core_sequences_.multipletempoexception.html" class="tsd-kind-icon">Multiple<wbr>Tempo<wbr>Exception</a></li>
								<li class="tsd-kind-class tsd-parent-kind-external-module"><a href="../classes/_core_sequences_.multipletimesignatureexception.html" class="tsd-kind-icon">Multiple<wbr>Time<wbr>Signature<wbr>Exception</a></li>
								<li class="tsd-kind-class tsd-parent-kind-external-module"><a href="../classes/_core_sequences_.negativetimeexception.html" class="tsd-kind-icon">Negative<wbr>Time<wbr>Exception</a></li>
								<li class="tsd-kind-class tsd-parent-kind-external-module"><a href="../classes/_core_sequences_.quantizationstatusexception.html" class="tsd-kind-icon">Quantization<wbr>Status<wbr>Exception</a></li>
							</ul>
						</section>
						<section class="tsd-index-section tsd-is-not-exported">
							<h3>Variables</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"><a href="_core_sequences_.html#quantize_cutoff" class="tsd-kind-icon">QUANTIZE_<wbr>CUTOFF</a></li>
							</ul>
						</section>
						<section class="tsd-index-section ">
							<h3>Functions</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="_core_sequences_.html#assertisabsolutequantizedsequence" class="tsd-kind-icon">assert<wbr>IsAbsolute<wbr>Quantized<wbr>Sequence</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="_core_sequences_.html#assertisquantizedsequence" class="tsd-kind-icon">assert<wbr>IsQuantized<wbr>Sequence</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="_core_sequences_.html#assertisrelativequantizedsequence" class="tsd-kind-icon">assert<wbr>IsRelative<wbr>Quantized<wbr>Sequence</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported"><a href="_core_sequences_.html#assertsingletempo" class="tsd-kind-icon">assert<wbr>Single<wbr>Tempo</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="_core_sequences_.html#clone" class="tsd-kind-icon">clone</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="_core_sequences_.html#concatenate" class="tsd-kind-icon">concatenate</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported"><a href="_core_sequences_.html#concatenatehelper" class="tsd-kind-icon">concatenate<wbr>Helper</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported"><a href="_core_sequences_.html#getquantizedtimeevents" class="tsd-kind-icon">get<wbr>Quantized<wbr>Time<wbr>Events</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="_core_sequences_.html#isabsolutequantizedsequence" class="tsd-kind-icon">is<wbr>Absolute<wbr>Quantized<wbr>Sequence</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported"><a href="_core_sequences_.html#ispowerof2" class="tsd-kind-icon">is<wbr>Power<wbr>Of2</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="_core_sequences_.html#isquantizedsequence" class="tsd-kind-icon">is<wbr>Quantized<wbr>Sequence</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="_core_sequences_.html#isrelativequantizedsequence" class="tsd-kind-icon">is<wbr>Relative<wbr>Quantized<wbr>Sequence</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="_core_sequences_.html#mergeconsecutivenotes" class="tsd-kind-icon">merge<wbr>Consecutive<wbr>Notes</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="_core_sequences_.html#mergeinstruments" class="tsd-kind-icon">merge<wbr>Instruments</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="_core_sequences_.html#quantizenotesequence" class="tsd-kind-icon">quantize<wbr>Note<wbr>Sequence</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported"><a href="_core_sequences_.html#quantizenotesandevents" class="tsd-kind-icon">quantize<wbr>Notes<wbr>And<wbr>Events</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="_core_sequences_.html#quantizetostep" class="tsd-kind-icon">quantize<wbr>ToStep</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="_core_sequences_.html#replaceinstruments" class="tsd-kind-icon">replace<wbr>Instruments</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="_core_sequences_.html#split" class="tsd-kind-icon">split</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="_core_sequences_.html#stepsperquartertostepspersecond" class="tsd-kind-icon">steps<wbr>Per<wbr>Quarter<wbr>ToSteps<wbr>Per<wbr>Second</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="_core_sequences_.html#trim" class="tsd-kind-icon">trim</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported"><a href="_core_sequences_.html#trimhelper" class="tsd-kind-icon">trim<wbr>Helper</a></li>
								<li class="tsd-kind-function tsd-parent-kind-external-module"><a href="_core_sequences_.html#unquantizesequence" class="tsd-kind-icon">unquantize<wbr>Sequence</a></li>
							</ul>
						</section>
					</div>
				</section>
			</section>
			<section class="tsd-panel-group tsd-member-group tsd-is-not-exported">
				<h2>Variables</h2>
				<section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported">
					<a name="quantize_cutoff" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagConst">Const</span> QUANTIZE_<wbr>CUTOFF</h3>
					<div class="tsd-signature tsd-kind-icon">QUANTIZE_<wbr>CUTOFF<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">0.5</span><span class="tsd-signature-symbol"> =&nbsp;0.5</span></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in <a href="https://github.com/tensorflow/magenta-js/tree/master/music/src/core/sequences.ts#L36">core/sequences.ts:36</a></li>
						</ul>
					</aside>
				</section>
			</section>
			<section class="tsd-panel-group tsd-member-group ">
				<h2>Functions</h2>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="assertisabsolutequantizedsequence" class="tsd-anchor"></a>
					<h3>assert<wbr>IsAbsolute<wbr>Quantized<wbr>Sequence</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">assert<wbr>IsAbsolute<wbr>Quantized<wbr>Sequence<span class="tsd-signature-symbol">(</span>ns<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">INoteSequence</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/tensorflow/magenta-js/tree/master/music/src/core/sequences.ts#L343">core/sequences.ts:343</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Confirms that the given NoteSequence has been quantized by absolute time.</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>ns: <span class="tsd-signature-type">INoteSequence</span></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="assertisquantizedsequence" class="tsd-anchor"></a>
					<h3>assert<wbr>IsQuantized<wbr>Sequence</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">assert<wbr>IsQuantized<wbr>Sequence<span class="tsd-signature-symbol">(</span>ns<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">INoteSequence</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/tensorflow/magenta-js/tree/master/music/src/core/sequences.ts#L309">core/sequences.ts:309</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Confirms that the given NoteSequence has been quantized.</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>ns: <span class="tsd-signature-type">INoteSequence</span></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="assertisrelativequantizedsequence" class="tsd-anchor"></a>
					<h3>assert<wbr>IsRelative<wbr>Quantized<wbr>Sequence</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">assert<wbr>IsRelative<wbr>Quantized<wbr>Sequence<span class="tsd-signature-symbol">(</span>ns<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">INoteSequence</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/tensorflow/magenta-js/tree/master/music/src/core/sequences.ts#L326">core/sequences.ts:326</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Confirms that the given NoteSequence has been quantized relative to tempo.</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>ns: <span class="tsd-signature-type">INoteSequence</span></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
					<a name="assertsingletempo" class="tsd-anchor"></a>
					<h3>assert<wbr>Single<wbr>Tempo</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
						<li class="tsd-signature tsd-kind-icon">assert<wbr>Single<wbr>Tempo<span class="tsd-signature-symbol">(</span>ns<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">INoteSequence</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/tensorflow/magenta-js/tree/master/music/src/core/sequences.ts#L162">core/sequences.ts:162</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Confirms there is no tempo change.</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>ns: <span class="tsd-signature-type">INoteSequence</span></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="clone" class="tsd-anchor"></a>
					<h3>clone</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">clone<span class="tsd-signature-symbol">(</span>ns<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">INoteSequence</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">NoteSequence</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/tensorflow/magenta-js/tree/master/music/src/core/sequences.ts#L80">core/sequences.ts:80</a></li>
								</ul>
							</aside>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>ns: <span class="tsd-signature-type">INoteSequence</span></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">NoteSequence</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="concatenate" class="tsd-anchor"></a>
					<h3>concatenate</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">concatenate<span class="tsd-signature-symbol">(</span>concatenateSequences<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">INoteSequence</span><span class="tsd-signature-symbol">[]</span>, sequenceDurations<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">NoteSequence</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/tensorflow/magenta-js/tree/master/music/src/core/sequences.ts#L551">core/sequences.ts:551</a></li>
								</ul>
							</aside>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>concatenateSequences: <span class="tsd-signature-type">INoteSequence</span><span class="tsd-signature-symbol">[]</span></h5>
								</li>
								<li>
									<h5><span class="tsd-flag ts-flagOptional">Optional</span> sequenceDurations: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">NoteSequence</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
					<a name="concatenatehelper" class="tsd-anchor"></a>
					<h3>concatenate<wbr>Helper</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
						<li class="tsd-signature tsd-kind-icon">concatenate<wbr>Helper<span class="tsd-signature-symbol">(</span>seqs<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">INoteSequence</span><span class="tsd-signature-symbol">[]</span>, totalKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"totalQuantizedSteps"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"totalTime"</span>, startKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"startTime"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"quantizedStartStep"</span>, endKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"endTime"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"quantizedEndStep"</span>, sequenceDurations<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">NoteSequence</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/tensorflow/magenta-js/tree/master/music/src/core/sequences.ts#L607">core/sequences.ts:607</a></li>
								</ul>
							</aside>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>seqs: <span class="tsd-signature-type">INoteSequence</span><span class="tsd-signature-symbol">[]</span></h5>
								</li>
								<li>
									<h5>totalKey: <span class="tsd-signature-type">"totalQuantizedSteps"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"totalTime"</span></h5>
								</li>
								<li>
									<h5>startKey: <span class="tsd-signature-type">"startTime"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"quantizedStartStep"</span></h5>
								</li>
								<li>
									<h5>endKey: <span class="tsd-signature-type">"endTime"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"quantizedEndStep"</span></h5>
								</li>
								<li>
									<h5><span class="tsd-flag ts-flagOptional">Optional</span> sequenceDurations: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">NoteSequence</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
					<a name="getquantizedtimeevents" class="tsd-anchor"></a>
					<h3>get<wbr>Quantized<wbr>Time<wbr>Events</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
						<li class="tsd-signature tsd-kind-icon">get<wbr>Quantized<wbr>Time<wbr>Events<span class="tsd-signature-symbol">(</span>ns<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">INoteSequence</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">IControlChange</span><span class="tsd-signature-symbol">[]</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/tensorflow/magenta-js/tree/master/music/src/core/sequences.ts#L111">core/sequences.ts:111</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Returns a list of events with a <code>time</code> and <code>quantizedStep</code> properties.</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>ns: <span class="tsd-signature-type">INoteSequence</span></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">IControlChange</span><span class="tsd-signature-symbol">[]</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="isabsolutequantizedsequence" class="tsd-anchor"></a>
					<h3>is<wbr>Absolute<wbr>Quantized<wbr>Sequence</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">is<wbr>Absolute<wbr>Quantized<wbr>Sequence<span class="tsd-signature-symbol">(</span>ns<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">INoteSequence</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/tensorflow/magenta-js/tree/master/music/src/core/sequences.ts#L336">core/sequences.ts:336</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Returns whether the given NoteSequence has been quantized by absolute time.</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>ns: <span class="tsd-signature-type">INoteSequence</span></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
					<a name="ispowerof2" class="tsd-anchor"></a>
					<h3>is<wbr>Power<wbr>Of2</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
						<li class="tsd-signature tsd-kind-icon">is<wbr>Power<wbr>Of2<span class="tsd-signature-symbol">(</span>n<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/tensorflow/magenta-js/tree/master/music/src/core/sequences.ts#L76">core/sequences.ts:76</a></li>
								</ul>
							</aside>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>n: <span class="tsd-signature-type">number</span></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="isquantizedsequence" class="tsd-anchor"></a>
					<h3>is<wbr>Quantized<wbr>Sequence</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">is<wbr>Quantized<wbr>Sequence<span class="tsd-signature-symbol">(</span>ns<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">INoteSequence</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/tensorflow/magenta-js/tree/master/music/src/core/sequences.ts#L300">core/sequences.ts:300</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Returns whether or not a NoteSequence proto has been quantized.</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>ns: <span class="tsd-signature-type">INoteSequence</span></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="isrelativequantizedsequence" class="tsd-anchor"></a>
					<h3>is<wbr>Relative<wbr>Quantized<wbr>Sequence</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">is<wbr>Relative<wbr>Quantized<wbr>Sequence<span class="tsd-signature-symbol">(</span>ns<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">INoteSequence</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/tensorflow/magenta-js/tree/master/music/src/core/sequences.ts#L319">core/sequences.ts:319</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Returns whether the given NoteSequence has been quantized relative to tempo.</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>ns: <span class="tsd-signature-type">INoteSequence</span></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="mergeconsecutivenotes" class="tsd-anchor"></a>
					<h3>merge<wbr>Consecutive<wbr>Notes</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">merge<wbr>Consecutive<wbr>Notes<span class="tsd-signature-symbol">(</span>sequence<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">INoteSequence</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">NoteSequence</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/tensorflow/magenta-js/tree/master/music/src/core/sequences.ts#L485">core/sequences.ts:485</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Any consecutive notes of the same pitch are merged into a sustained note.
										Does not merge notes that connect on a measure boundary. This process
										also rearranges the order of the notes - notes are grouped by instrument,
									then ordered by timestamp.</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>sequence: <span class="tsd-signature-type">INoteSequence</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>A quantized <code>NoteSequence</code> to be merged.</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">NoteSequence</span></h4>
							<p>a new <code>NoteSequence</code> with sustained notes merged.</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="mergeinstruments" class="tsd-anchor"></a>
					<h3>merge<wbr>Instruments</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">merge<wbr>Instruments<span class="tsd-signature-symbol">(</span>ns<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">INoteSequence</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">NoteSequence</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/tensorflow/magenta-js/tree/master/music/src/core/sequences.ts#L408">core/sequences.ts:408</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Assign instruments to the notes, pitch bends, and control changes of a
										<code>NoteSequence</code> based on program numbers and drum status. All drums will be
										assigned the last instrument (and program 0). All non-drum events with the
									same program number will be assigned to a single instrument.</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>ns: <span class="tsd-signature-type">INoteSequence</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>The <code>NoteSequence</code> for which to merge instruments. Will not be
										modified.</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">NoteSequence</span></h4>
							<p>A copy of <code>ns</code> with merged instruments.</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="quantizenotesequence" class="tsd-anchor"></a>
					<h3>quantize<wbr>Note<wbr>Sequence</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">quantize<wbr>Note<wbr>Sequence<span class="tsd-signature-symbol">(</span>ns<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">INoteSequence</span>, stepsPerQuarter<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">NoteSequence</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/tensorflow/magenta-js/tree/master/music/src/core/sequences.ts#L215">core/sequences.ts:215</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Quantize a NoteSequence proto relative to tempo.</p>
								</div>
								<p>The input NoteSequence is copied and quantization-related fields are
									populated. Sets the <code>steps_per_quarter</code> field in the <code>quantization_info</code>
								message in the NoteSequence.</p>
								<p>Note start and end times, and chord times are snapped to a nearby quantized
									step, and the resulting times are stored in a separate field (e.g.,
									QuantizedStartStep). See the comments above <code>QUANTIZE_CUTOFF</code> for details
								on how the quantizing algorithm works.</p>
								<dl class="tsd-comment-tags">
									<dt>throws</dt>
									<dd><p>{MultipleTempoException} If there is a change in tempo in
										the sequence.</p>
									</dd>
									<dt>throws</dt>
									<dd><p>{MultipleTimeSignatureException} If there is a change in time
										signature in the sequence.</p>
									</dd>
									<dt>throws</dt>
									<dd><p>{BadTimeSignatureException} If the time signature found in
										the sequence has a 0 numerator or a denominator which is not a power of 2.</p>
									</dd>
									<dt>throws</dt>
									<dd><p>{NegativeTimeException} If a note or chord occurs at a negative
										time.</p>
									</dd>
								</dl>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>ns: <span class="tsd-signature-type">INoteSequence</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>The <code>NoteSequence</code> to quantize.</p>
									</div>
								</li>
								<li>
									<h5>stepsPerQuarter: <span class="tsd-signature-type">number</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>Each quarter note of music will be divided into
										this many quantized time steps.</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">NoteSequence</span></h4>
							<p>A copy of the original NoteSequence, with quantized times added.</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
					<a name="quantizenotesandevents" class="tsd-anchor"></a>
					<h3>quantize<wbr>Notes<wbr>And<wbr>Events</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
						<li class="tsd-signature tsd-kind-icon">quantize<wbr>Notes<wbr>And<wbr>Events<span class="tsd-signature-symbol">(</span>ns<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">INoteSequence</span>, stepsPerSecond<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/tensorflow/magenta-js/tree/master/music/src/core/sequences.ts#L125">core/sequences.ts:125</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Quantize the notes and events of a NoteSequence proto in place.
										Note start and end times, and chord times are snapped to a nearby
										quantized step, and the resulting times are stored in a separate field
										(e.g. QuantizedStartStep). See the comments above <code>QUANTIZE_CUTOFF</code> for
									details on how the quantizing algorithm works.</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>ns: <span class="tsd-signature-type">INoteSequence</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>A <code>NoteSequence</code> to quantize. Will be modified in place.</p>
									</div>
								</li>
								<li>
									<h5>stepsPerSecond: <span class="tsd-signature-type">number</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>Each second will be divided into this many
										quantized time steps.</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="quantizetostep" class="tsd-anchor"></a>
					<h3>quantize<wbr>ToStep</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">quantize<wbr>ToStep<span class="tsd-signature-symbol">(</span>unquantizedSeconds<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, stepsPerSecond<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, quantizeCutoff<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/tensorflow/magenta-js/tree/master/music/src/core/sequences.ts#L101">core/sequences.ts:101</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Quantizes seconds to the nearest step, given steps_per_second.
										See the comments above <code>QUANTIZE_CUTOFF</code> for details on how the
									quantizing algorithm works.</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>unquantizedSeconds: <span class="tsd-signature-type">number</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>Seconds to quantize.</p>
									</div>
								</li>
								<li>
									<h5>stepsPerSecond: <span class="tsd-signature-type">number</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>Quantizing resolution.</p>
									</div>
								</li>
								<li>
									<h5><span class="tsd-flag ts-flagDefault value">Default value</span> quantizeCutoff: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> =&nbsp;QUANTIZE_CUTOFF</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>Value to use for quantizing cutoff.</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4>
							<p>the quantized step.</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="replaceinstruments" class="tsd-anchor"></a>
					<h3>replace<wbr>Instruments</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">replace<wbr>Instruments<span class="tsd-signature-symbol">(</span>originalSequence<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">INoteSequence</span>, replaceSequence<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">INoteSequence</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">NoteSequence</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/tensorflow/magenta-js/tree/master/music/src/core/sequences.ts#L440">core/sequences.ts:440</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Replaces all the notes in an input sequence that match the instruments in
										a second sequence. For example, if <code>replaceSequence</code> has notes that all have
										either <code>instrument=0</code> or <code>instrument=1</code>, then any notes in <code>originalSequence</code>
										with instruments 0 or 1 will be removed and replaced with the notes in
										<code>replaceSequence</code>. If there are instruments in <code>replaceSequence</code> that are
									<em>not</em> in <code>originalSequence</code>, they will not be added.</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>originalSequence: <span class="tsd-signature-type">INoteSequence</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>The <code>NoteSequence</code> to be changed.</p>
									</div>
								</li>
								<li>
									<h5>replaceSequence: <span class="tsd-signature-type">INoteSequence</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>The <code>NoteSequence</code> that will replace the notes in
										<code>sequence</code> with the same instrument.</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">NoteSequence</span></h4>
							<p>a new <code>NoteSequence</code> with the instruments replaced.</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="split" class="tsd-anchor"></a>
					<h3>split</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">split<span class="tsd-signature-symbol">(</span>seq<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">INoteSequence</span>, chunkSize<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">NoteSequence</span><span class="tsd-signature-symbol">[]</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/tensorflow/magenta-js/tree/master/music/src/core/sequences.ts#L680">core/sequences.ts:680</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Splits a quantized <code>NoteSequence</code> into smaller <code>NoteSequences</code> of
										equal chunks. If a note splits across a chunk boundary, then it will be
									split between the two chunks.</p>
								</div>
								<p>Silent padding may be added to the final chunk to make it <code>chunkSize</code>.</p>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>seq: <span class="tsd-signature-type">INoteSequence</span></h5>
								</li>
								<li>
									<h5>chunkSize: <span class="tsd-signature-type">number</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>The number of steps per chunk. For example, if you want to
											split the sequence into 2 bar chunks, then if the sequence has 4
										steps/quarter, that will be 32 steps for each 2 bars (so a chunkSize of 32).</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">NoteSequence</span><span class="tsd-signature-symbol">[]</span></h4>
							<p>An array of <code>NoteSequences</code> each of which are at most <code>chunkSize</code>
							steps.</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="stepsperquartertostepspersecond" class="tsd-anchor"></a>
					<h3>steps<wbr>Per<wbr>Quarter<wbr>ToSteps<wbr>Per<wbr>Second</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">steps<wbr>Per<wbr>Quarter<wbr>ToSteps<wbr>Per<wbr>Second<span class="tsd-signature-symbol">(</span>stepsPerQuarter<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, qpm<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/tensorflow/magenta-js/tree/master/music/src/core/sequences.ts#L87">core/sequences.ts:87</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Calculates steps per second given stepsPerQuarter and a QPM.</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>stepsPerQuarter: <span class="tsd-signature-type">number</span></h5>
								</li>
								<li>
									<h5>qpm: <span class="tsd-signature-type">number</span></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="trim" class="tsd-anchor"></a>
					<h3>trim</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">trim<span class="tsd-signature-symbol">(</span>ns<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">INoteSequence</span>, start<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, end<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, truncateEndNotes<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">NoteSequence</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/tensorflow/magenta-js/tree/master/music/src/core/sequences.ts#L596">core/sequences.ts:596</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Trim notes from a NoteSequence to lie within a specified time range.
										Notes starting before <code>start</code> are not included. Notes ending after
									<code>end</code> are not included, unless <code>truncateEndNotes</code> is true.</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>ns: <span class="tsd-signature-type">INoteSequence</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>The NoteSequence for which to trim notes.</p>
									</div>
								</li>
								<li>
									<h5>start: <span class="tsd-signature-type">number</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>The time after which all notes should begin. This should be
											either seconds (if ns is unquantized), or a quantized step (if ns is
										quantized).</p>
									</div>
								</li>
								<li>
									<h5>end: <span class="tsd-signature-type">number</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>The time before which all notes should end. This should be
											either seconds (if ns is unquantized), or a quantized step (if ns is
										quantized).</p>
									</div>
								</li>
								<li>
									<h5><span class="tsd-flag ts-flagOptional">Optional</span> truncateEndNotes: <span class="tsd-signature-type">boolean</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>Optional. If true, then notes starting before
										the end time but ending after it will be included and truncated.</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">NoteSequence</span></h4>
							<p>A new NoteSequence with all notes trimmed to lie between <code>start</code>
							and <code>end</code>, and time-shifted to begin at 0.</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
					<a name="trimhelper" class="tsd-anchor"></a>
					<h3>trim<wbr>Helper</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
						<li class="tsd-signature tsd-kind-icon">trim<wbr>Helper<span class="tsd-signature-symbol">(</span>ns<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">INoteSequence</span>, start<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, end<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, totalKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"totalQuantizedSteps"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"totalTime"</span>, startKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"startTime"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"quantizedStartStep"</span>, endKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"endTime"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"quantizedEndStep"</span>, truncateEndNotes<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">NoteSequence</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/tensorflow/magenta-js/tree/master/music/src/core/sequences.ts#L641">core/sequences.ts:641</a></li>
								</ul>
							</aside>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>ns: <span class="tsd-signature-type">INoteSequence</span></h5>
								</li>
								<li>
									<h5>start: <span class="tsd-signature-type">number</span></h5>
								</li>
								<li>
									<h5>end: <span class="tsd-signature-type">number</span></h5>
								</li>
								<li>
									<h5>totalKey: <span class="tsd-signature-type">"totalQuantizedSteps"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"totalTime"</span></h5>
								</li>
								<li>
									<h5>startKey: <span class="tsd-signature-type">"startTime"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"quantizedStartStep"</span></h5>
								</li>
								<li>
									<h5>endKey: <span class="tsd-signature-type">"endTime"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"quantizedEndStep"</span></h5>
								</li>
								<li>
									<h5><span class="tsd-flag ts-flagOptional">Optional</span> truncateEndNotes: <span class="tsd-signature-type">boolean</span></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">NoteSequence</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-external-module">
					<a name="unquantizesequence" class="tsd-anchor"></a>
					<h3>unquantize<wbr>Sequence</h3>
					<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-external-module">
						<li class="tsd-signature tsd-kind-icon">unquantize<wbr>Sequence<span class="tsd-signature-symbol">(</span>qns<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">INoteSequence</span>, qpm<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">NoteSequence</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in <a href="https://github.com/tensorflow/magenta-js/tree/master/music/src/core/sequences.ts#L361">core/sequences.ts:361</a></li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>Create an unquantized version of a quantized <code>NoteSequence</code>.</p>
								</div>
								<p>Any existing times will be replaced in the output <code>NoteSequence</code> and
								quantization info and steps will be removed.</p>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>qns: <span class="tsd-signature-type">INoteSequence</span></h5>
								</li>
								<li>
									<h5><span class="tsd-flag ts-flagOptional">Optional</span> qpm: <span class="tsd-signature-type">number</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>The tempo to use. If not provided, the tempo in <code>ns</code> is used,
										or the default of 120 if it is not specified in the sequence either.</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">NoteSequence</span></h4>
							<p>a new non-quantized <code>NoteSequence</code> wih time in seconds.</p>
						</li>
					</ul>
				</section>
			</section>
		</div>
		<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
			<nav class="tsd-navigation primary">
				<ul>
					<li class="globals  ">
						<a href="../globals.html"><em>Globals</em></a>
					</li>
					<li class="current tsd-kind-external-module">
						<a href="_core_sequences_.html">"core/sequences"</a>
					</li>
				</ul>
			</nav>
			<nav class="tsd-navigation secondary menu-sticky">
				<ul class="before-current">
					<li class=" tsd-kind-class tsd-parent-kind-external-module">
						<a href="../classes/_core_sequences_.badtimesignatureexception.html" class="tsd-kind-icon">Bad<wbr>Time<wbr>Signature<wbr>Exception</a>
					</li>
					<li class=" tsd-kind-class tsd-parent-kind-external-module">
						<a href="../classes/_core_sequences_.multipletempoexception.html" class="tsd-kind-icon">Multiple<wbr>Tempo<wbr>Exception</a>
					</li>
					<li class=" tsd-kind-class tsd-parent-kind-external-module">
						<a href="../classes/_core_sequences_.multipletimesignatureexception.html" class="tsd-kind-icon">Multiple<wbr>Time<wbr>Signature<wbr>Exception</a>
					</li>
					<li class=" tsd-kind-class tsd-parent-kind-external-module">
						<a href="../classes/_core_sequences_.negativetimeexception.html" class="tsd-kind-icon">Negative<wbr>Time<wbr>Exception</a>
					</li>
					<li class=" tsd-kind-class tsd-parent-kind-external-module">
						<a href="../classes/_core_sequences_.quantizationstatusexception.html" class="tsd-kind-icon">Quantization<wbr>Status<wbr>Exception</a>
					</li>
					<li class=" tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported">
						<a href="_core_sequences_.html#quantize_cutoff" class="tsd-kind-icon">QUANTIZE_<wbr>CUTOFF</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="_core_sequences_.html#assertisabsolutequantizedsequence" class="tsd-kind-icon">assert<wbr>IsAbsolute<wbr>Quantized<wbr>Sequence</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="_core_sequences_.html#assertisquantizedsequence" class="tsd-kind-icon">assert<wbr>IsQuantized<wbr>Sequence</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="_core_sequences_.html#assertisrelativequantizedsequence" class="tsd-kind-icon">assert<wbr>IsRelative<wbr>Quantized<wbr>Sequence</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
						<a href="_core_sequences_.html#assertsingletempo" class="tsd-kind-icon">assert<wbr>Single<wbr>Tempo</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="_core_sequences_.html#clone" class="tsd-kind-icon">clone</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="_core_sequences_.html#concatenate" class="tsd-kind-icon">concatenate</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
						<a href="_core_sequences_.html#concatenatehelper" class="tsd-kind-icon">concatenate<wbr>Helper</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
						<a href="_core_sequences_.html#getquantizedtimeevents" class="tsd-kind-icon">get<wbr>Quantized<wbr>Time<wbr>Events</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="_core_sequences_.html#isabsolutequantizedsequence" class="tsd-kind-icon">is<wbr>Absolute<wbr>Quantized<wbr>Sequence</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
						<a href="_core_sequences_.html#ispowerof2" class="tsd-kind-icon">is<wbr>Power<wbr>Of2</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="_core_sequences_.html#isquantizedsequence" class="tsd-kind-icon">is<wbr>Quantized<wbr>Sequence</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="_core_sequences_.html#isrelativequantizedsequence" class="tsd-kind-icon">is<wbr>Relative<wbr>Quantized<wbr>Sequence</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="_core_sequences_.html#mergeconsecutivenotes" class="tsd-kind-icon">merge<wbr>Consecutive<wbr>Notes</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="_core_sequences_.html#mergeinstruments" class="tsd-kind-icon">merge<wbr>Instruments</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="_core_sequences_.html#quantizenotesequence" class="tsd-kind-icon">quantize<wbr>Note<wbr>Sequence</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
						<a href="_core_sequences_.html#quantizenotesandevents" class="tsd-kind-icon">quantize<wbr>Notes<wbr>And<wbr>Events</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="_core_sequences_.html#quantizetostep" class="tsd-kind-icon">quantize<wbr>ToStep</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="_core_sequences_.html#replaceinstruments" class="tsd-kind-icon">replace<wbr>Instruments</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="_core_sequences_.html#split" class="tsd-kind-icon">split</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="_core_sequences_.html#stepsperquartertostepspersecond" class="tsd-kind-icon">steps<wbr>Per<wbr>Quarter<wbr>ToSteps<wbr>Per<wbr>Second</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="_core_sequences_.html#trim" class="tsd-kind-icon">trim</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
						<a href="_core_sequences_.html#trimhelper" class="tsd-kind-icon">trim<wbr>Helper</a>
					</li>
					<li class=" tsd-kind-function tsd-parent-kind-external-module">
						<a href="_core_sequences_.html#unquantizesequence" class="tsd-kind-icon">unquantize<wbr>Sequence</a>
					</li>
				</ul>
			</nav>
		</div>
	</div>
</div>
<footer class="with-border-bottom">
	<div class="container">
		<h2>Legend</h2>
		<div class="tsd-legend-group">
			<ul class="tsd-legend">
				<li class="tsd-kind-module"><span class="tsd-kind-icon">Module</span></li>
				<li class="tsd-kind-object-literal"><span class="tsd-kind-icon">Object literal</span></li>
				<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li>
				<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
				<li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li>
				<li class="tsd-kind-index-signature"><span class="tsd-kind-icon">Index signature</span></li>
				<li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li>
				<li class="tsd-kind-enum-member"><span class="tsd-kind-icon">Enumeration member</span></li>
				<li class="tsd-kind-property tsd-parent-kind-enum"><span class="tsd-kind-icon">Property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-enum"><span class="tsd-kind-icon">Method</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
				<li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li>
				<li class="tsd-kind-constructor tsd-parent-kind-interface"><span class="tsd-kind-icon">Constructor</span></li>
				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
				<li class="tsd-kind-index-signature tsd-parent-kind-interface"><span class="tsd-kind-icon">Index signature</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
				<li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li>
				<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
				<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
				<li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li>
				<li class="tsd-kind-index-signature tsd-parent-kind-class"><span class="tsd-kind-icon">Index signature</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li>
				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
				<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
				<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected accessor</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li>
				<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private accessor</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
				<li class="tsd-kind-call-signature tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
			</ul>
		</div>
	</div>
</footer>
<div class="container tsd-generator">
	<p>Generated using <a href="http://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
<script>if (location.protocol == 'file:') document.write('<script src="../assets/js/search.js"><' + '/script>');</script>
</body>
</html>